/*****************************************************************
 MYD Engine v0.1

 File: myd_timer.h
 Created: 09/07/09
*****************************************************************/

#ifndef MYD_TIMER_H
#define MYD_TIMER_H

//#include <windows.h>
#include "system/myd_system.h"

namespace myd
{
	class MYD_API Timer
	{
		//constructor / destructor
		public:
			Timer();
			~Timer();

		//measure
		public:
			void firstMeasure();
			void measure();

		//accessors
		public:
			float getTimeBetweenFrames() const;
			unsigned int getFPS() const;

		// 
		private:
			double TimeBetweenFrames;
			double MeasureFpsSample;
			unsigned int m_uiFPS;
			unsigned int m_uiFrameCounter;

			LARGE_INTEGER PerfCount1;
			LARGE_INTEGER PerfCount2;
			LARGE_INTEGER Frequency;
	};
	#include "myd_timer.inl"
} // end namespace
#endif // MYD_TIMER_H
